﻿/**
 * 另种模式进行匹配，由于保证有解，比较简单
 */
#include <bits/stdc++.h>
using namespace std;

#include <bits/extc++.h>
using namespace __gnu_pbds;

using llt = long long;

int N;
string S;

bool isV(char ch){return 'a' == ch or 'e' == ch;}
bool isC(char ch){return 'b' <= ch and ch <= 'd';}

vector<string> Ans;

void proc(){
    Ans.clear();
    Ans.reserve(2E5);
    int k = 0;
    while(1){
        assert(isC(S[k]) and isV(S[k + 1]));
        if(k + 2 == N or (k + 3 < N and isV(S[k + 3]))){
            Ans.emplace_back(S.substr(k, 2));
            Ans.emplace_back(".");
            k += 2;
        }else{
            Ans.push_back(S.substr(k, 3));
            Ans.emplace_back(".");
            k += 3;
        } 
        if(k == N) break;
    }
    for(int i=0,n=Ans.size();i+1<n;++i) cout << Ans[i];
    cout << "\n";
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase = 1;
    const array<string, 3> t {"ABC", "CAB", "BCA"};
    cin >> nofkase;
    while(nofkase--){
        cin >> N >> S;
        proc();
    }
    return 0;
}